
const db = require("./db");

let obj = {
    db: new db(),
    async user () {
        let getDB = await this.db.instance();
        return getDB.collection("user");    
    },
    async works () {
        let getDB = await this.db.instance();
        return getDB.collection("works");
    },
    async comment () {
        let getDB = await this.db.instance();
        return getDB.collection("comment");
    },
    async image () {
        let getDB = await this.db.instance();
        return getDB.collection("image");
    },
    async video () {
        let getDB = await this.db.instance();
        return getDB.collection("video");
    }
};

module.exports = obj;